package com.sitechasia.webx.components.xtable.customertag;

import org.extremecomponents.table.bean.Table;
import org.extremecomponents.table.core.TableModel;
import org.extremecomponents.table.tag.TableTag;
import org.extremecomponents.table.tag.TagUtils;

public class CeTableTag extends TableTag {

	private String divWidth;

	private Boolean isShowTotalMessage = true;//是否显示总行数信息

	/**
	 * 功能描述：Table对象创建的时候被调用
	 */
	public void addTableAttributes(TableModel model, Table table) {
		table.addAttribute("divWidth", TagUtils.evaluateExpressionAsString("divWidth",getDivWidth(), this, pageContext));
		table.addAttribute("divHeight", TagUtils.evaluateExpressionAsString("divHeight",getDivHeight(), this, pageContext));
		//添加是否显示总行数标识
		table.addAttribute("isShowTotalMessage", TagUtils.evaluateExpressionAsBoolean("isShowTotalMessage",String.valueOf(getIsShowTotalMessage()), this, pageContext));
	}



	private String divHeight;

	public String getDivHeight() {
		return divHeight;
	}

	public void setDivHeight(String divHeight) {
		this.divHeight = divHeight;
	}

	public String getDivWidth() {
		return divWidth;
	}

	public void setDivWidth(String divWidth) {
		this.divWidth = divWidth;
	}

	public Boolean getIsShowTotalMessage() {
		return isShowTotalMessage;
	}

	public void setIsShowTotalMessage(Boolean isShowTotalMessage) {
		this.isShowTotalMessage = isShowTotalMessage;
	}

}
